

from PyQt5 import QtCore, QtGui, QtWidgets, Qt
from PyQt5.QtGui import QBrush, QPixmap, QIcon, QImage,QFont

class Ui_MainWindow(object):
    def setupUi(self, MainWindow):
        MainWindow.setObjectName("MainWindow")

        MainWindow.setFixedSize(1007, 650)
        # MainWindow.setWindowFlag(QtCore.Qt.FramelessWindowHint)
        # MainWindow.setWindowOpacity(0.9)  # 设置窗口透明度
        # MainWindow.setAttribute(QtCore.Qt.WA_TranslucentBackground)
        MainWindow.setStyleSheet('''
            background:rgb(176,224,230);
        ''')
        qss = """
                    background:transparent;
                    border:none;
                    font-size:20px;
                    border-bottom:2px solid rgb(0,0,0);
                        
                """
        qss1 = """
                        border:none;
                        border-bottom:3px solid lightgreen;
                        font-size:18px;
                        font-weight:700;
                        font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
                """
        qss2 = """
                QPushButton{
                /*background:transparent;*/
                border:none;
                background-color:rgba(0,150,136,0.4);
                border-radius:5px;
            }
                QPushButton:hover{
                /*border-bottom:4px solid rgba(0,150,136,0.4);*/
                background-color:rgba(0,150,136);
                border-bottom:4px solid rgba(0,150,136);
            }
                """

        self.centralwidget = QtWidgets.QWidget(MainWindow)
        self.centralwidget.setObjectName("centralwidget")
        self.clas = QtWidgets.QLabel(self.centralwidget)
        self.clas.setGeometry(QtCore.QRect(700, 440, 72, 25))
        self.clas.setStyleSheet(qss1)
        self.clas.setObjectName("clas")
        self.major = QtWidgets.QLabel(self.centralwidget)
        self.major.setGeometry(QtCore.QRect(700, 410, 72, 25))
        self.major.setStyleSheet(qss1)
        self.major.setObjectName("major")
        # self.query = QtWidgets.QPushButton(self.centralwidget)
        # self.query.setGeometry(QtCore.QRect(780, 480, 93, 28))
        # self.query.setStyleSheet(qss2)
        # self.query.setObjectName("query")
        self.Sno1 = QtWidgets.QLineEdit(self.centralwidget)
        self.Sno1.setGeometry(QtCore.QRect(790, 320, 150, 25))
        self.Sno1.setStyleSheet(qss)
        self.Sno1.setObjectName("Sno1")
        self.Sdt = QtWidgets.QLabel(self.centralwidget)
        self.Sdt.setGeometry(QtCore.QRect(700, 360, 72, 25))
        self.Sdt.setStyleSheet(qss1)
        self.Sdt.setObjectName("Sdt")
        self.Picture_coll = QtWidgets.QPushButton(self.centralwidget)
        self.Picture_coll.setGeometry(QtCore.QRect(420, 580, 93, 28))
        self.Picture_coll.setStyleSheet(qss2)
        self.Picture_coll.setObjectName("Picture_coll")
        self.camear = QtWidgets.QLabel(self.centralwidget)
        self.camear.setGeometry(QtCore.QRect(10, 10, 611, 541))
        self.camear.setStyleSheet("border:2px groove gray;border-radius:10px;padding:2px 4px;")
        self.camear.setObjectName("camear")
        self.name1 = QtWidgets.QLineEdit(self.centralwidget)
        self.name1.setGeometry(QtCore.QRect(790, 280, 150, 25))
        self.name1.setStyleSheet(qss)
        self.name1.setObjectName("name1")
        self.dell = QtWidgets.QPushButton(self.centralwidget)
        self.dell.setGeometry(QtCore.QRect(870, 480, 93, 28))
        self.dell.setStyleSheet(qss2)
        self.dell.setObjectName("del")
        self.open_camear = QtWidgets.QPushButton(self.centralwidget)
        self.open_camear.setGeometry(QtCore.QRect(120, 580, 93, 28))
        self.open_camear.setStyleSheet(qss2)
        self.open_camear.setObjectName("open_camear")
        self.Sno = QtWidgets.QLabel(self.centralwidget)
        self.Sno.setGeometry(QtCore.QRect(700, 320, 72, 25))
        self.Sno.setStyleSheet(qss1)
        self.Sno.setObjectName("Sno")
        self.major1 = QtWidgets.QLineEdit(self.centralwidget)
        self.major1.setGeometry(QtCore.QRect(790, 410, 150, 25))
        self.major1.setStyleSheet(qss)
        self.major1.setObjectName("major1")
        self.Sdt1 = QtWidgets.QLineEdit(self.centralwidget)
        self.Sdt1.setGeometry(QtCore.QRect(790, 370, 150, 25))
        self.Sdt1.setStyleSheet(qss)
        self.Sdt1.setObjectName("Sdt1")
        self.clas1 = QtWidgets.QLineEdit(self.centralwidget)
        self.clas1.setGeometry(QtCore.QRect(790, 440, 150, 25))
        self.clas1.setStyleSheet(qss)
        self.clas1.setObjectName("clas1")
        self.save_info = QtWidgets.QPushButton(self.centralwidget)
        self.save_info.setGeometry(QtCore.QRect(690, 480, 93, 28))
        self.save_info.setStyleSheet(qss2)
        self.save_info.setObjectName("save_info")
        self.picture = QtWidgets.QLabel(self.centralwidget)
        self.picture.setGeometry(QtCore.QRect(670, 10, 320, 250))
        self.picture.setObjectName("picture")
        self.picture.setStyleSheet("border:2px groove gray;border-radius:10px;padding:2px 4px;")
        self.name = QtWidgets.QLabel(self.centralwidget)
        self.name.setGeometry(QtCore.QRect(700, 280, 72, 25))
        self.name.setStyleSheet(qss1)
        self.name.setObjectName("name")
        self.revert = QtWidgets.QPushButton(self.centralwidget)
        self.revert.setGeometry(QtCore.QRect(270, 580, 93, 28))
        self.revert.setStyleSheet(qss2)
        self.revert.setObjectName("revert")
        MainWindow.setCentralWidget(self.centralwidget)
        self.statusBar = QtWidgets.QStatusBar(MainWindow)
        self.statusBar.setObjectName("statusBar")
        MainWindow.setStatusBar(self.statusBar)

        self.retranslateUi(MainWindow)
        QtCore.QMetaObject.connectSlotsByName(MainWindow)

    def retranslateUi(self, MainWindow):
        _translate = QtCore.QCoreApplication.translate
        MainWindow.setWindowTitle(_translate("MainWindow", "人脸采集"))
        self.clas.setText(_translate("MainWindow", "班    级："))
        self.major.setText(_translate("MainWindow", "专    业："))
        #self.query.setText(_translate("MainWindow", "查询"))
        self.Sdt.setText(_translate("MainWindow", "学    部："))
        self.Picture_coll.setText(_translate("MainWindow", "图片采集"))
        self.dell.setText(_translate("MainWindow", "重置"))
        self.open_camear.setText(_translate("MainWindow", "打开摄像头"))
        self.Sno.setText(_translate("MainWindow", "学    号："))
        self.save_info.setText(_translate("MainWindow", "保存"))
        self.name.setText(_translate("MainWindow", "姓    名："))
        self.revert.setText(_translate("MainWindow", "返   回"))
